package com.study.concurrent.A_ThreadManagement.l_UseThreadFactoryCreateThreads;

/**
 * Created by 赵超 on 2017/3/20.
 */
public class Main {
    public static void main(String[] args) {
        MyThreadFactory factory = new MyThreadFactory("MyThreadFactory");
        Task task = new Task();
        Thread thread;
        for (int i = 0; i < 10; i++) {
            thread = factory.newThread(task);
            thread.start();
        }
        System.out.printf("线程状态：\n");
        System.out.printf("%s\n", factory.getStats());
    }
}
